<div class="panel panel-default panel-intro">
    <div class="panel-heading">
        <ul class="nav nav-tabs">
            <li class="active"><a href="#t-all" data-toggle="tab">{:__('行业切换')}</a></li>
        </ul>
    </div>
    <div class="panel-body">
        <div id="myTabContent" class="tab-content">
            <div class="tab-pane fade active in" id="t-all">
                <div class="widget-body no-padding">
                    <div class="row">
                        <div class="col-sm-12">
                            <div class="alert alert-info">
                                <h4><i class="fa fa-info-circle"></i> 当前行业</h4>
                                <p>您当前使用的是：<strong class="text-primary">{if isset($current_industry_name) && $current_industry_name}{$current_industry_name}{else}沙发制造{/if}</strong></p>
                                <p>行业代码：<code>{if isset($current_industry) && $current_industry}{$current_industry}{else}furniture_sofa{/if}</code></p>
                            </div>
                        </div>
                    </div>
                    
                    <div class="row">
                        <div class="col-sm-12">
                            <div class="panel panel-default">
                                <div class="panel-heading">
                                    <h3 class="panel-title">选择要切换的行业</h3>
                                </div>
                                <div class="panel-body">
                                    <form id="industry-switch-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
                                        <div class="form-group">
                                            <label class="control-label col-xs-12 col-sm-2">选择行业:</label>
                                            <div class="col-xs-12 col-sm-8">
                                            <select class="form-control" name="industry_code" data-rule="required">
                                                <option value="">请选择行业</option>
                                                <option value="furniture_sofa" {if $current_industry == 'furniture_sofa'}selected{/if}>沙发制造 (furniture_sofa)</option>
                                                <option value="machinery" {if $current_industry == 'machinery'}selected{/if}>机械制造 (machinery)</option>
                                                <option value="apparel" {if $current_industry == 'apparel'}selected{/if}>服装制造 (apparel)</option>
                                            </select>
                                            </div>
                                        </div>
                                        
                                        <div class="form-group">
                                            <label class="control-label col-xs-12 col-sm-2"></label>
                                            <div class="col-xs-12 col-sm-8">
                                                <button type="submit" class="btn btn-success btn-embossed">
                                                    <i class="fa fa-refresh"></i> 切换行业
                                                </button>
                                                <button type="button" class="btn btn-default btn-embossed" onclick="history.back()">
                                                    <i class="fa fa-arrow-left"></i> 返回
                                                </button>
                                            </div>
                                        </div>
                                    </form>
                                </div>
                            </div>
                        </div>
                    </div>
                    
                    {volist name="list" id="item"}
                    <div class="row">
                        <div class="col-sm-12">
                            <div class="panel panel-default">
                                <div class="panel-heading">
                                    <h3 class="panel-title">
                                        {$item.industry_name}
                                        {if $item.industry_code == $current_industry}
                                        <span class="label label-success">当前使用</span>
                                        {/if}
                                    </h3>
                                </div>
                                <div class="panel-body">
                                    <div class="row">
                                        <div class="col-sm-6">
                                            <h5>基本信息</h5>
                                            <ul class="list-unstyled">
                                                <li><strong>ID:</strong> {$item.id}</li>
                                                <li><strong>行业代码:</strong> <code>{$item.industry_code}</code></li>
                                                <li><strong>行业名称:</strong> <strong>{$item.industry_name}</strong></li>
                                                <li><strong>行业类型:</strong> 
                                                    {if $item.industry_type == 'discrete'}
                                                    离散制造
                                                    {elseif $item.industry_type == 'process'}
                                                    流程制造
                                                    {elseif $item.industry_type == 'hybrid'}
                                                    混合制造
                                                    {else}
                                                    {$item.industry_type}
                                                    {/if}
                                                </li>
                                                <li><strong>状态:</strong> 
                                                    {if $item.status == 'normal'}
                                                    <span class="text-success">启用</span>
                                                    {else}
                                                    <span class="text-danger">禁用</span>
                                                    {/if}
                                                </li>
                                                <li><strong>激活状态:</strong> 
                                                    {if $item.is_active == 1}
                                                    <span class="text-success">已激活</span>
                                                    {else}
                                                    <span class="text-muted">未激活</span>
                                                    {/if}
                                                </li>
                                                <li><strong>默认状态:</strong> 
                                                    {if $item.is_default == 1}
                                                    <span class="text-info">默认</span>
                                                    {else}
                                                    <span class="text-muted">非默认</span>
                                                    {/if}
                                                </li>
                                                <li><strong>排序:</strong> 
                                                    <span class="text-muted">{$item.sort}</span>
                                                </li>
                                                <li><strong>创建时间:</strong> 
                                                    <span class="text-muted">{$item.createtime|date='Y-m-d H:i:s',###}</span>
                                                </li>
                                                <li><strong>更新时间:</strong> 
                                                    <span class="text-muted">{$item.updatetime|date='Y-m-d H:i:s',###}</span>
                                                </li>
                                            </ul>
                                        </div>
                                        <div class="col-sm-6">
                                            <h5>配置信息</h5>
                                            <ul class="list-unstyled">
                                                <li><strong>自定义字段:</strong> 
                                                    {if !empty($item.field_config)}
                                                    <span class="text-success">已配置</span>
                                                    {else}
                                                    <span class="text-muted">未配置</span>
                                                    {/if}
                                                </li>
                                                <li><strong>排程规则:</strong> 
                                                    {if !empty($item.algorithm_config)}
                                                    <span class="text-success">已配置</span>
                                                    {else}
                                                    <span class="text-muted">未配置</span>
                                                    {/if}
                                                </li>
                                                <li><strong>工艺流程:</strong> 
                                                    {if !empty($item.process_config)}
                                                    <span class="text-success">已配置</span>
                                                    {else}
                                                    <span class="text-muted">未配置</span>
                                                    {/if}
                                                </li>
                                                <li><strong>UI配置:</strong> 
                                                    {if !empty($item.ui_config)}
                                                    <span class="text-success">已配置</span>
                                                    {else}
                                                    <span class="text-muted">未配置</span>
                                                    {/if}
                                                </li>
                                                <li><strong>数据模板:</strong> 
                                                    {if !empty($item.data_template)}
                                                    <span class="text-success">已配置</span>
                                                    {else}
                                                    <span class="text-muted">未配置</span>
                                                    {/if}
                                                </li>
                                            </ul>
                                        </div>
                                    </div>
                                    
                                    {if !empty($item.description)}
                                    <div class="row">
                                        <div class="col-sm-12">
                                            <h5>行业描述</h5>
                                            <p class="text-muted">{$item.description}</p>
                                        </div>
                                    </div>
                                    {/if}
                                    
                                    <div class="row">
                                        <div class="col-sm-12">
                                            <h5>行业类型</h5>
                                            <p class="text-muted">
                                                {if $item.industry_type == 'discrete'}
                                                离散制造
                                                {elseif $item.industry_type == 'process'}
                                                流程制造
                                                {elseif $item.industry_type == 'hybrid'}
                                                混合制造
                                                {else}
                                                {$item.industry_type}
                                                {/if}
                                            </p>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                    {/volist}
                </div>
            </div>
        </div>
    </div>
</div>

